#include "ocaml_type.h"

inline int LIST_LENGTH(OCamlList list) {
	int i = 0;
	
	while(list!=NIL) {
		i++;
		list = LIST_NEXT(list);
	}
	return i;
}



inline Option is_None(value v) {
  if(Int_val(v)==0)
    return None;
  else
  	return Some;


}

